﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoBinding
	{
	class Produit : INotifyPropertyChanged
		{
		string m_code;
		string m_description;

		public string code
			{
			get { return m_code; }
			set { m_code = value; RaisePropertyChangedEvent("code"); }
			}

		public string description
			{
			get { return m_description; }
			set { m_description = value;  }
			}

		void RaisePropertyChangedEvent(string propertyName)
			{
			if(PropertyChanged != null)
				{
				PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
				}
		}

		public event PropertyChangedEventHandler PropertyChanged;
		}
	}
